package com;

import java.math.BigInteger;
import java.util.Scanner;

public class Test01 {//100阶乘
    public static void main(String[] args) {
        System.out.print("请输入一个整数求阶乘:");
        String s = new Scanner(System.in).nextLine();
        System.out.println(Mulptiy(new BigInteger(s)).toString());

    }

    public static BigInteger Mulptiy(BigInteger n) {
        if (n.intValue() == 1) return new BigInteger("1");
        BigInteger b = new BigInteger("1");
        BigInteger b2 = n.subtract(b);
        return n.multiply(Mulptiy(b2));
    }
}
